﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:odc="clr-namespace:Odyssey.Controls" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style TargetType="{x:Type ToggleButton }" x:Key="buttonInSection">
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Height" Value="28" />
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="ClickMode" Value="Press" />
        <Setter Property="Background"
                Value="{DynamicResource {ComponentResourceKey odc:Skins, SectionButtonGradientBrush}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Border Background="{TemplateBinding Background}" Focusable="False" x:Name="border"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            BorderBrush="{DynamicResource {ComponentResourceKey odc:Skins, BorderBrush}}">
                        <ContentControl Focusable="False" Background="{TemplateBinding Background}"
                                Content="{TemplateBinding Content}" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background"
                                    Value="{DynamicResource {ComponentResourceKey odc:Skins, HighlightButtonGradientBrush}}"
                                    TargetName="border" />
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="Background"
                                    Value="{DynamicResource {ComponentResourceKey odc:Skins, SelectedButtonGradientBrush}}"
                                    TargetName="border" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>